Fix Docker Build Failure Due to Deprecated Kubeval Schema URL #87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix Docker Build Failure Due to Deprecated Kubeval Schema URL
Problem
The Docker build for the
gprofilerwebapp service was failing with a 404 error when attempting to download the Kubernetes DaemonSet JSON schema fromkubernetesjsonschema.dev:Root Cause
The
kubevaltool and its associated schema hosting service (kubernetesjsonschema.dev) are no longer maintained. The domain and schema files are no longer available, causing the Docker build to fail during the schema download step.Solution
Migrated to kubeconform as the replacement validation tool, following the official recommendation from the kubeval repository:
Changes Made
Updated
src/gprofiler/Dockerfileto download the DaemonSet schema from the kubernetes-json-schema repository maintained by the kubeconform project:Before:
After:
Key Changes:
kubernetesjsonschema.dev(deprecated) toraw.githubusercontent.com/yannh/kubernetes-json-schemav1.35.0(latest stable at time of fix)instrumenta/kubevaltoyannh/kubeconformImpact
References
Testing
After applying this change:
backend/utils/daemonset_files/daemonsetspec.jsonNotes
v1.35.0should be periodically updated to match the target Kubernetes cluster version--skip-schema-validationflag, but this approach is not recommended as it disables important validation checks